package com.steak.desgin.delegate;

import java.util.HashMap;
import java.util.Map;

/**
 * @author 刘牌
 * @date 2022/3/12 2:22
 */
public class DeptLeader implements ITask {
    private final Map<String, ITask> staffTaskMap = new HashMap<>();

    public DeptLeader() {
        staffTaskMap.put("整理资料",new StaffLiu());
        staffTaskMap.put("收集资料",new StaffZhang());
        staffTaskMap.put("传送资料",new StaffLi());
    }

    @Override
    public void dispatch(String task) {
        if (staffTaskMap.containsKey(task)) staffTaskMap.get(task).dispatch(task);
    }
}
